Multicast message filtering in virtual environments

ABSTRACT

Various systems, processes, and products may be used to filter multicast messages in virtual environments. In one implementation, a multicast filtering address is received by a network adapter from at least one of a number of virtual machines of a computer system. Responsive to receiving the multicast filtering address, a determination is made whether a multicast filtering store of the network adapter is full. Responsive to determining that the multicast filtering store of the network adapter is full, the multicast filtering address is stored in a local filtering store of the at least one virtual machine.

BACKGROUND

The present invention relates to computer systems, and more particularlyto messaging for computer systems.

Virtual machines techniques, which are available from a number ofcompanies, including International Business Machines of Armonk, N.Y. andVMWare Inc. of Palo Alto, Calif., allow a portion of a relatively largecomputer system to be formed into a smaller computer system for aspecific purpose as needed. For instance, a portion of a server systemmay be formed into a Web server. Moreover, the smaller computer systemmay be replicated as needed to provide more computing resources. Forinstance, a large number of Web servers could be quickly formed from afirst Web server. Thus, virtual machines may be implemented quickly andare quite useful in dynamic environments.

A number of virtual machines may be serviced by a single networkadapter. In the traditional network adapter driver model, multicastaddresses are pushed down to the network adapter (e.g., for filteringpurposes) until a threshold is met. This threshold is normally definedin the network adapter hardware specification, although newer adapterswith a firmware-based intermediary can blindly accept addresses andprovide feedback on the status of their acceptance by the hardware(e.g., add successful or add failed). In the end, however, the devicedriver is still required to manage a list of addresses.

In the context of managing multicast addresses for a number of virtualmachines, a pre-determined allocation of resources is typically used fordistributing the resources amongst the various virtual machines. Forexample, the resources may be divided evenly between the virtualmachines. This solution allows for all of the virtual machines tobenefit from the acceleration that the hardware provides

BRIEF SUMMARY

In one implementation, a process for filtering multicast messages invirtual environments may include receiving, by a network adapter, fromat least one of a number of virtual machines of a computer system, amulticast filtering address. Responsive to receiving the multicastfiltering address, a determination is made whether a multicast filteringstore of the network adapter is full. Responsive to determining that themulticast filtering store of the network adapter is full, the multicastfiltering address is stored in a local filtering store of the at leastone virtual machine.

The details and features of various implementations will be conveyed bythe following description, along with the drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an example system for filteringmulticast messages in virtual environments.

FIGS. 2A-B are a flowchart illustrating an example process for filteringmulticast messages in virtual environments.

FIG. 3 is a flowchart illustrating another example process for filteringmulticast messages in virtual environments.

FIG. 4 is a block diagram illustrating a network adapter for filteringmulticast messages in virtual environments.

DETAILED DESCRIPTION

Multicast messages may be filtered in virtual environments by a varietyof techniques. In particular implementations, for example, a networkadapter may store multicast filtering data locally and on one or morevirtual machines, which may be potential receivers of the multicastmessages. When a multicast message is received, the network adapter mayfirst examine its local store and, if there is no match, examine thestores on the virtual machines. Thus, multicast filtering may beprovided at a hardware level, which is relatively fast, while stillproviding multicast filtering for a large number of virtual machines.Moreover, the filtering data may be dynamically assigned and reallocatedby the network adapter.

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be implemented as a system, method, or computer programproduct. Accordingly, aspects of the present disclosure may take theform of an entirely hardware environment, an entirely softwareembodiment (including firmware, resident software, micro-code, etc.), oran implementation combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module,” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of a computer readable storagemedium would include the following: an electrical connection having oneor more wires, a portable computer diskette, a hard disk, a randomaccess memory (RAM), a read-only memory (ROM), an erasable programmableread-only memory (EPROM or Flash memory), an optical fiber, a portablecompact disc read-only memory (CD-ROM), an optical storage device, amagnetic storage device, or any suitable combination of the foregoing.In the context of this disclosure, a computer readable storage mediummay be a tangible medium that can contain or store a program for use byor in connection with an instruction execution system, apparatus, ordevice.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any medium, including but not limited to wireless, wireline,optical fiber cable, RF, etc. or any suitable combination of theforegoing.

Computer program code for carrying out operations for aspects of thedisclosure may be written in any combination of one or more programminglanguages such as Java, Smalltalk, C++ or the like and conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the disclosure are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to implementations.It will be understood that each block of the flowchart illustrationsand/or block diagrams, and combinations of blocks in the flowchartillustrations and/or block diagrams, can be implemented by computerprogram instructions. These computer program instructions may beprovided to a processor of a general purpose computer, special purposecomputer, or other programmable data processing apparatus to produce amachine, such that the instructions, which execute via the processor ofthe computer or other programmable data processing apparatus, createmeans for implementing the functions/acts specified in the flowchartand/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other device to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions thatimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions that execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 1 illustrates an example system 100 for filtering multicastmessages in a virtual environment. System 100 includes a computer system110 on which a number of virtual machines 120 are operating. Computersystem 110 includes a processing system 112, memory 114, a networkadapter 116, and a virtualizer engine 118. Computer system 110 may becomposed of various hardware and software components, such as, forexample, servers, processors, databases, and storage areas. Computersystem 110 may, for instance, be a data center. Computer system 110 mayappear as a single computer system to applications using and accessingit. Computer system 110 may, for instance, use virtualization to appearas an integrated computer system.

In particular implementations, computer system 110 may be a virtualinput-output server (VIOS) from International Business Machines ofArmonk, N.Y. A VIOS may provide an operating environment for virtual I/Oadministration. A VIOS may also facilitate the sharing of physical I/Oresources between the virtual machines supported by computer system 110,such as virtual machines 120, by creating virtual devices. For example,a VIOS may provide virtual small computer system interface (SCSI) targetand shared Ethernet adapter capability to client virtual machines withinthe data processing system, allowing the client virtual machines toshare SCSI devices and Ethernet adapters.

Memory 114 may include, among other things, operating systems andapplications for virtual machines 120. Memory 114 may also include avariety of other items for the virtual machines (e.g., queues, transmitengines, receive engines) as well as for the computer system (e.g.,operating system and applications). Memory 114 may be composed of one ormore storage devices (e.g., hard drives, tape drives, flash drives,etc.).

Network adapter 116 is a physical device that provides access to acommunication network (e.g., a LAN, a WAN, or the Internet). Networkadapter 116 acts as a single physical adapter and also creates virtualadapters, represented to virtual machines 120, which could, for example,be System p Logical Partitions (LPARs) from International BusinessMachines Corporation, as real physical adapters. Adapters able toperform this include those supporting the Single Root I/O Virtualization(SRIOV) extension to the PCI-E standard and the Multi-Root I/OVirtualization (MRIOV) extension. In general, any extension that allowsI/O virtualization may be used.

SRIOV adapters utilize a dual function strategy when it comes tomanaging the device. There are virtual functions (VFs) that are thevirtual adapter instances assigned to virtual machines. These arerepresented to a virtual machine just as any traditional adapter and areprogrammed/accessed via register access and direct memory access (DMA).There are also physical functions (PFs) that have control over a domainof VFs. Each PF acts as the parent PCI function for multiple VFs (theactual number is device specific). PFs can define operating parametersfor the VFs in their domain and are also controlled via register accessand DMA, at a VM level or via a hypervisor. For simplicity sake, anyreferences in this disclosure to a controlling device driver refer tothe PF. SRIOV is becoming increasingly relevant in the enterprise serverecosystem as it consolidates via virtualization.

Virtualized network adapters share physical resources amongst a finitebut dynamic number of virtual functions. A common allocation approach isto evenly distribute physical resources amongst the supported VFs.Supported VFs can be all possible VFs supported by the hardware or allVFs that are assigned to the PFs and are currently in use, althoughchanges in allocation may require an adapter reset. Another approachdistributes resources based upon expected usage. For example, functionsmapping to a 10 GbE link will likely need more resources than thosemapped to a 1 GbE link, and magnitudes more than those mapped to 100 MbElink. While most resources easily fit into these methods of allocation,resources that require acute prioritization may be limited by staticallocation.

Network adapter 116 also supports multicast filtering by using multicastfiltering store 117. Multicast messages are used by network applicationsto send content from one machine (whether real or virtual) in a networkto a group of machines (whether real or virtual) that are listening fora particular address. The destination addresses (e.g., multicast groupsthat the machines are listening on) for the multicast messages arerequested by an application on a virtual machine and registered with anetwork interface, which may correspond with a single physical networkport or multiple physical network ports. As a performance enhancement,network adapter 116 supports multicast filtering (e.g., by exact matchor inexact via a hash algorithm) performed in the hardware, which could,for example be an application specific integrated circuit.

Virtualizer engine 118 is responsible for providing an interface betweenvirtual machines 120 and computer system 110, which is responsible foractually executing the operations of the virtual machines 120 andtransferring data to and from memory 114. Virtualizer engine 118 mayexport various virtualized hardware components such as virtual CPU(s),virtual memory, virtual disks, and virtual devices as constructs oremulations to the virtual machines. Thus, virtualizer engine 118 maymake the resources of computer system 110 appear as a single computersystem when it is in fact a number of computer systems. In particularimplementations, virtualizer engine 118 may be a thin piece of softwarethat runs on a host (e.g., along with the host operating system) orthrough an intervening kernel, which performs the functions of the hostoperating system.

In some implementations, virtualizer engine 118 may include a VIOS, ahypervisor, and a hardware management console. A hypervisor, also knownas a virtual machine manager, is a program that enables multipleoperating systems to share a single hardware host. Each operating systemmay appear to have the host's processor, memory, and other systemresources all to itself. However, the hypervisor may actually controlthe host processor and the system resources, allocating the necessaryresources to each operating system. The virtualizer engine, for example,may be built on Advanced Interactive eXecutive (AIX) from InternationalBusiness Machines Corporation.

Each virtual machine 120 is a segmentation of computer system 110,virtualized as a separate computer system. In a VIOS environment, forexample, each virtual machine 120 is a logical partition of computersystem 110. Virtual machines 120 can be quickly deployed by allowing theimage of the executable code that composes the solution for which thevirtual machine partition is created to be shared amongst all similarvirtual machines. Each virtual machine 120 may, however, behave as anindependent computer system. Virtual machines 120 may, for example, beservers (e.g., Web, application, or database) or other appropriate typesof computer systems.

Each of virtual machines 120 includes an operating system 122, which maybe an image of an operating system in memory 114. Operating systems 122may actually be different operating systems (e.g., Linux, Unix, and AIX)or different versions of the same operating system (e.g., 1.2, 1.4, and2.1). Virtual machines 120 may run the same operating system (e.g.,Linux), or they may run different operating systems. The applicationsfor each virtual machine 120 may also be different.

Each virtual machine 120 also includes an adapter 124, which is a VF ofnetwork adapter 116, and a multicast filtering store 128, which may becreated by computer system 110 at network adapter initialization.Through network adapter 116 and adapter 124, virtual machines 120 canreceive multicast messages, which are often used in streaming. Virtualmachines 120 may also receive unicast messages and broadcast messages.

For the multicast scenario, a message source sends messages that arereceived by machines that are listening for them (e.g., looking for aparticular destination address). Virtual machines 120 may register thedestination addresses for which they desire to receive messages withnetwork adapter 116. In particular implementations, various applicationson virtual machines 120 may register addresses with network adapter 116.These addresses, or representations thereof, may be placed in multicastfiltering store 117, along with any other associated data (e.g.,reference counts).

A reference count, for example, is a counter that is incremented eachtime an address is attempted to be added to the store (e.g., by anapplication on a virtual machine) and decremented each time the addressis attempted to be removed from the store. Thus, the counter may be usedto determine how many entities (e.g., virtual machines or applications)are interested in a multicast address while only having to store themulticast address one time.

The reference count could, for example, be implemented on a networkadapter wide basis, in which case, the network adapter could have ametric regarding how many entities are currently interested in themulticast address (e.g., the difference between the number of times thereference count has been added and deleted). This could assist indetermining which multicast addresses to store in multicast filteringstores 128. For instance, if a multicast address has a relatively highreference count, it may be a candidate for storage on network adapter116, and a multicast address with a relatively low reference count maybe a candidate for storage in one of multicast filtering stores 128.When the reference count reaches zero, the multicast address, along withits associated data, if any, could be removed from local store 116 or amulticast filtering store 128. The reference count could also be storedon a per virtual machine basis (e.g., the network adapter couldunderstand that virtual machine A has added the multicast address threetime, virtual machine B has added the same address two times, andvirtual machine C has never added it), which could also be useful indetermining how to allocate resources on the network adapter. Forinstance, in addition to determining which filtering data to store inthe local store or in the multicast filtering stores, this counter typemay assist in determining on which virtual machine 120 to storefiltering data (e.g., on one that already is storing filtering data).

Multicast filtering stores 128 may be a region of memory on each virtualmachine 120 that may be reached by network adapter 116 (e.g., by DMAtechniques). Thus, virtual machines 120 may own the computer systemmemory 114 that will be mapped and used for the filtering stores. Hence,the virtual machines may allocate computer system memory 114 for thefiltering stores. And the virtual machines may also map the memory tothe network adapter (e.g., using operating system/virtualizer engineservices) and inform the network adapter about the mapping (e.g., via bymemory-mapped input/output (MMIO) operations or firmware-basedoperations). Typically, the network adapter is informed of the startinglocation of the region and its size. Multicast filtering stores 128 maystore addresses or representations of addresses for filtering multicastmessages, along with any other associated data.

In certain modes of operation, as multicast filtering addresses arepushed down to network adapter 116 from virtual machines 120 (e.g., byMMIO operations), the network adapter populates multicast filteringstore 117. Multicast filtering store 117 may actually contain the pusheddown addresses, representations of the addresses, or other data forfiltering multicast messages. Representations of the addresses may, forexample, be hash values of the addresses.

Network adapter 116 may use multicast filtering stores 128 of virtualmachines 120 as additional storage for multicast filtering data. Forexample, if multicast filtering store 117 is full when network adapter117 receives a multicast filtering address from virtual machine 120 b,network adapter 117 may store the associated filtering data (e.g., theaddress itself) in the multicast filtering store 128 for virtual machine120 b.

In particular implementations, network adapter 116 may select whichfiltering data to put in multicast filtering stores 128 other than usinga time-ordered basis. For example, network adapter 116 may examine theamount of filtering data each virtual machine 120 has, the frequency ofuse of filtering data in filtering store 117, the number of virtualmachines requesting a particular multicast address, and the time since apiece of filtering data was used. A virtual machine with a large amountof filtering data in filtering store 117 may, for instance, be selectedfor storing some of its associated filtering data in its filtering store128. Additionally, filtering data that is used less frequently may beselected for storing in filtering stores 128. As another example,priorities may be associated with the filtering data and used todetermine which filtering data to place in filtering stores 128.Furthermore, virtual machines 120 that are not using any multicastservices may have no space allocated to them in multicast filteringstore 117.

In some implementations, network adapter 116 may place multicastfiltering data in filtering stores 128 before filtering store 117 isfull. For example, network adapter may choose to place multicastfiltering data in filtering stores 128 when new filtering data has arelatively low priority.

If the virtual machine 120 associated with the filtering data to beoffloaded from networking adapter 116 does not have a region of memoryset up for multicast filtering data, network adapter 116 may request thevirtual machine to set up the area for the VF. A device driver for thevirtual machine may, for instance, allocate, map, and assign a writeableand readable region of its memory 126 to each virtual adapter in use,for the purpose of managing multicast filtering data. In particularimplementations, this area may be writeable and readable by networkadapter 116 through DMA techniques, and thus, the region may be set upat initialization. The creation of the DMA queue may, however, bedelayed until access to the region is needed. The size of multicastfiltering stores 128 is implementation specific, with factors determinedby the adapter hardware, the system architecture, and the retrievalstrategy (e.g., direct address match versus hashed address match versusapproximate address match), which will be discussed below.

When network adapter 116 receives an incoming multicast message (e.g., apacket), the adapter may filter the message against the data inmulticast filtering store 117. The network adapter may, for example,determine that a message is a multicast message by inspecting themessages as it arrives. In particular implementations, for example, thelower bit of the first octet in the Media Access Control (MAC) addressmay be inspected to determine whether a message is a multicast message.If the message is a multicast message, network adapter 116 may filterthe message against multicast filtering store 117. If a match is found,network adapter 116 may allow the message to pass through to virtualmachines 120, which may be listening for the multicast message at theiradapter 124. In particular implementations, the message may pass to thevirtual machines that requested to listen for that multicast messagetype (e.g., based on destination address). This may, for example, beaccomplished with virtual machine specific reference counts or via hash.In other implementations, the message may pass to all virtual machines120.

If, however, a match is not found in filtering store 117, networkadapter 116 may analyze multicast filtering stores 128, if any. Forexample, network adapter 116 may individually inspect each filteringstore 128.

Network adapter 116 may, for instance, know which virtual machines havemulticast features by inspecting addresses or tagging for the message.For instance, the network adapter may know which virtual LANs (VLANs)are configured over a particular network interface. Thus, the networkadapter can map incoming traffic to virtual machines through VLANidentifiers when using VLAN. Additionally, the network adapter may knowwhich virtual machines have requested multicast filtering, which mayreduce the number of virtual machine stores to inspect.

In particular implementations, filtering stores 128 are not examined iffiltering store 117 is not fully populated. If filtering store 117 isnot fully populated, for example, no data may exist in filtering stores128. The message may be dropped if no match is found in filtering store117 and it is not fully populated.

If a match for the destination address, or a representation thereof, isfound in one of filtering stores 128, network adapter 116 may allow themessage to pass to virtual machines 120. If a match is not found infiltering stores 128, the message may be dropped, thus preventingunnecessary traffic from flowing to the rest of computer system 110.

To minimize memory transactions in certain implementations, multicastfiltering data (e.g., addresses) could be stored in filter stores 128 ina manner that would facilitate the lookup process. This could, forexample, include storing the data in a hashed format so that networkadapter 116 can quickly determine if an address even exists in filteringstores 128. Under such a solution, incoming messages that failed toobtain a match in filtering store 117 could be hashed (e.g., accordingto destination address). The result would indicate an entry or area inthe filtering stores 128. The message could then be checked against thatentry. Due to the potentially expensive nature of memory transactions insuch a scenario, a group of addresses (e.g., 32) could also be hashed toa single region so that upon retrieval, a larger region of memory can beread in a single memory transaction rather than having a memorytransaction per address. In particular implementations, the hash of amessage may indicate an area in one of filtering stores that may beregarded as a match.

Network adapter 116 may also be able to determine which filtering stores128 to examine. For example, the filtering stores associated with amulticast message might be determined based on the destination addressor a VLAN tag. Additionally, the network adapter may know which virtualmachines have requested multicast filtering and/or how many addressesare associated with each, which may limit the number of filtering stores128 to examine.

System 100 has a variety of features. For example, by allowing a networkadapter to manage the multicast filtering data (e.g., by placingfiltering data in a multicast filtering store as needed), an enhancedallocation of the finite resources of the network adapter may beachieved. Thus, virtual machines that might previously have been deniedthe benefits of hardware acceleration (e.g., those that experience thegreater multicast traffic) due to a hard limitation may now be able tohave more resources allocated to them when demand is high, which mayprevent them from overflowing. Moreover, the allocation may be performedon a dynamic basis. Furthermore, because there are multiple strategiesfor determining priority (requested priority, most recently used, mostfrequently used, etc.), the network adapter may be configured (e.g., bya system administrator) to operate in a mode that best fits itsenvironment.

Additionally, system 100 allows potentially expensive memorytransactions to be reduced. For example, by using hashing a group ofaddresses to a single region, a larger region of memory can be read in asingle DMA transaction rather than having a transaction per address.

Although FIG. 1 illustrates one system for performing multicast messagefiltering in virtual environments, other systems may include fewer,additional, and/or a different configuration of components. For example,in some systems, not all virtual machines may have a filtering storeand/or an adapter. As another example, a computer system may have itsown operating system, which may be different from the operatingsystem(s) for the virtual machines.

FIG. 2 illustrates an example process 200 for filtering multicastmessages in virtual environments. Process 200 may, for example, beimplemented by a network adapter like network adapter 116.

Process 200 calls for determining whether an address for multicastfiltering has been received from a virtual machine (operation 204). Theaddress may, for example, be for an approved destination address (e.g.,multicast group) for multicast messages. If a multicast filteringaddress has not been received from a virtual machine, process 200 callsfor waiting for a multicast filtering address.

Once a multicast filtering address has been received from a virtualmachine, process 200 calls for examining a local multicast filteringstore (operation 208). The local store may, for example, includeaddresses or representations of addresses (e.g., hashed addresses).Process 200 also calls for determining whether the received address hasa match in the local store (operation 212). If the received address hasa match in the local store, process 200 is at an end. There is no needto store the received address (or a representation thereof) as it isalready stored locally.

If, however, the received address does not have a match in the localstore, process 200 calls for determining whether there is additionalspace in the local store (operation 216). A network adapter may only beable to locally store a limited amount of data (e.g., one-hundredaddresses). Thus, the local store may be overwhelmed when the networkadapter is supporting a large number of virtual machines (e.g.,hundreds).

If there is additional space in the local store, process 200 calls forstoring filtering data for the received address (e.g., the addressitself or a representation thereof) in the local store (operation 220).Process 200 is then at an end.

If, however, there is not additional space in the local store, process200 calls for determining filtering data to store in a multicastfiltering store of a virtual machine (operation 224). This may, forexample, be accomplished by examining statistics on the filtering datain the local store and the virtual machines with which the filteringdata are associated. For instance, if certain filtering data is usedinfrequently, it may be a likely candidate to move from the local storeto a filtering store of a virtual machine. As another example, if avirtual machine has a relatively large amount of filtering data in thelocal store, it may be desirable to move some of this filtering data outof the local store and to the virtual machine because this may allowvirtual machines with a smaller amount of filtering data in the localstore to have their filtering data stored locally, not to mentionisolating the number of locations that the network adapter has to lookto find additional filtering data. As an additional example, multicastmessages may have priorities associated with them, which may inform thedetermination.

Once filtering data has been selected for storage in a filtering storeof a virtual machine, process 200 calls for determining whether there isadditional space in the filtering store on the associated virtualmachine (operation 228). In particular implementations, the storage areamay be accessible or readable/writeable by the network adapter using DMAtechniques. Thus, a network adapter may manage the shared memory areavia DMA transactions. If additional space in the virtual machine'sfiltering store does not exist, process 200 calls for transitioning to amulticast all mode (operation 232), which may be for the particularvirtual machine or all virtual machines. Process 200 is then at an end.

If additional space in the virtual machine's filtering store does exist,process 200 calls for storing the filtering data in the filtering storeof the associated virtual machine (operation 236). This may, forexample, be accomplished by transferring the filtering data to thevirtual machine store using DMA techniques. Thus, while the virtualmachine owns the memory for the filtering store, the network adaptermanages the store, allowing the network adapter to store whatever datait desires there (e.g., address, hashed address, reference count, etc.).

Process 200 also calls for determining whether the filtering data storedin the virtual machine's filtering store is for the received address(operation 240). If the filtering data stored in the virtual machine'sfiltering store is for the received address, process 200 is at an end.If, however, the filtering data stored in the virtual machine'sfiltering store is not for the received address, process 200 calls forstoring filtering data for the received address in the local filteringstore (operation 244). Process 200 is then at an end.

Process 200 may be repeated multiple times during the operation of asystem supporting virtual machines. In particular implementations,process 200 may be repeated continuously.

Although FIG. 2 illustrates a process for multicast message filtering invirtual environments, other processes for multicast message filtering invirtual environments may include fewer, additional, and/or a differentarrangement of operations. For example, a process may place filteringdata in the store of a virtual machine even if there is space in thelocal store. This may, for instance, occur if the available space in thelocal store is reserved for higher priority multicast messages. Asanother example, a process may not determine which filtering data tostore in the filtering store of a virtual machine. For instance, theprocess may simply store the filtering data for the received address inthe associated virtual machine. As a further example, a process may callfor generating a mapping to virtual machines having multicast filteringstores to assist in analyzing those stores.

As an additional example, the addresses (or representations thereof) inthe local filtering store may have associated data stored with them. Forexample, each address may have an associated reference counter such thatthe counter is incremented each time the address is attempted to beadded to the store and decremented each time the address is attempted tobe removed from the store. Thus, the counter may be used to determinehow many virtual machines (or applications therein) are interested in amulticast address.

In certain implementations, a process could include moving filteringdata from a virtual machine to the local store. This could, for example,occur as space becomes available in a network adapter's filtering store.A virtual machine may, for example, inform a network adapter that amulticast filtering address is no longer of interest, which could allowthe network adapter to remove the associated filtering data from thelocal store (e.g., if the reference count went to zero). The networkadapter may then select which data to move from a virtual machine to thelocal store (e.g., based on frequency of use). Moreover, data may beswapped between a virtual machine and the local store based onstatistics regarding filtering data (e.g., frequency of use, time sincelast use, reference counts) and/or priority.

FIG. 3 illustrates an example process 300 for multicast messagefiltering in virtual environments. Process 300 may, for example, beimplemented by a network adapter like network adapter 116.

Process 300 calls for determining whether a multicast message has beenreceived (operation 304). Determining whether a multicast message hasbeen received may, for example, include examining a portion of a headerfor a message (e.g., an address). The multicast message may, forexample, have been received from an external communication network or avirtual machine on the same host computer system. If the message is froma virtual machine using the same physical adapter, the message could berouted using the network adapter's internal virtual switch. If amulticast message has not been received, process 300 calls for waitingto receive a multicast message.

Once a multicast message has been received, process 300 calls forexamining a local filtering store for a match for the destinationaddress (operation 308). A match may, for example, be an exact match(e.g., address to address or hashed address to hashed address) or anapproximate match (e.g., to a region of memory). Process 300 also callsfor determining whether there is a match for the destination address inthe local store (operation 312). If there is a match for the destinationaddress in the local store, process 300 calls for passing the message toa number of virtual machines (operation 316). Process 300 is then at anend.

If, however, there is not a match for the destination address in thelocal store, process 300 calls for determining whether the local storeis full (operation 320). If the local store is not full, process 300calls for dropping the message (operation 324). Process 300 is then atan end.

If, however, the local store is full, process 300 calls for identifyinga number of virtual machines to analyze for an address match (operation328). The virtual machines to analyze may, for example, be determined bydetermining which virtual machines have filtering stores. Additionally,a hash function could be performed on the destination address and mappedto a table to determine the virtual machines to analyze.

Process 300 also calls for analyzing the filtering store of anidentified virtual machine (operation 332). This may, for example,entail reading the contents of the filtering store by DMA techniques.Process 300 further calls for determining whether a match (e.g., exactor approximate) for the destination address was found (operation 336).If a match was found, process 300 calls for passing the message to anumber of virtual machines (operation 316). Process 300 is then at anend.

If, however, a match was not found, process 300 calls for determiningwhether there is another virtual machine to analyze (operation 340). Ifthere is another virtual machine to analyze, process 300 calls foranalyzing the filtering store of the additional virtual machine(operation 332). Process 300 may cycle through operations 332-340 untila match for the destination address is found or the identified virtualmachines have been examined.

If the identified virtual machines have been examined and no match forthe destination address has been found, process 300 calls for droppingthe message (operation 324). Process 300 is then at an end.

Process 300 may be repeated multiple times during the operation of asystem supporting virtual machines. In particular implementations,process 300 may be repeated continuously.

Although FIG. 3 illustrates a process for filtering multicast messagesin virtual environments, other processes for filtering multicastmessages in virtual environments may include fewer, additional, and/or adifferent arrangement of operations. For example, a process may includeanalyzing the filtering store of a virtual machine even if the localstore is not full. The local store may, for example, not be full whilefiltering data is in the virtual machines because the local store isreserved for filtering data for higher priority multicast messages.Additionally, any appropriate match may be used for a multicast message.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of systems, methods, andcomputer program products of various implementations of the disclosure.In this regard, each block in the flowchart or block diagrams mayrepresent a module, segment, or portion of code, which can include oneor more executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or the flowchart illustration, and combination ofblocks in the block diagrams and/or flowchart illustration, can beimplemented by special purpose hardware-based systems the perform thespecified function or acts, or combinations of special purpose hardwareand computer instructions.

FIG. 4 illustrates an example network adapter 400 for multicast messagefiltering in virtual environments. Network adapter 400 may, for example,be similar to network adapter 116 in system 100.

Network adapter 400 includes a processor 410, a host computer interface420, memory 430, and a communication network interface 450, which arecoupled together by a network 460. Network adapter 400 is only oneexample of a suitable network adapter, however, and is not intended tosuggest any limitation as to the scope of use or functionality of otherimplementations described herein. Regardless, network adapter 400 iscapable of being implemented and/or performing any of the functionalityset forth hereinabove.

Processor 410 typically includes a logical processing unit (e.g., anarithmetic logic unit) that processes data under the direction ofprogram instructions (e.g., from software or firmware). For example,processor 410 may be a microprocessor, a microcontroller, or anapplication specific integrated circuit. The processor may operate byreduced instruction set computer (RISC) or complex instruction setcomputer (CISC) principles. In general, the processor may be any devicethat manipulates data in a logical manner.

Host computer interface 420 may, for example, be a bus interface forcommunicatively coupling with a host computer system. The bus interfacemay, for instance, be Peripheral Component Interconnect Express (PCI-E)interface. In general, host computer interface 420 may be anycombination of devices by which a network adapter can receive data fromand output data to a host computer system.

Memory 430 may, for example, include random access memory (RAM),read-only memory (ROM), flash memory, and/or disc memory. Various itemsmay be stored in different portions of the memory at various times.Memory 430, in general, may be any combination of devices for storingdata.

Memory 430 includes instructions 431 and data 436. Instructions 431include an operating system 432 (e.g., Windows, Linux, or Unix), atransmit engine 433, a receive engine 434, and a filtering engine 435.In particular implementations, some or all of instructions 431 may becontained within the network adapter's chip (e.g., an ApplicationSpecific Integrated Circuit (ASIC)).

Data 436 includes the data required for and/or produced by instructions431, including a transmit DMA queue 437, a receive DMA queue 438, amulticast DMA queue 439, a receive message store 440, and a multicastfiltering store 441. Transmit DMA queue 437 and receive DMA queue 438may correspond to a transmit DMA queue and a receive DMA queue on avirtual machine. Thus, an instance of each DMA queue may exist in hostcomputer system memory and on network adapter 400.

Transmit engine 433 is responsible for reading messages from messagebuffers on a virtual machine (e.g., according to transmit DMA queue 437)and sending them into a communication network, which could be anexternal network or a virtual network supported by the network adapter.Receive engine 434 is responsible for receiving messages from thecommunication network, placing them into receive message store 440,selecting descriptors from receive DMA queue 438, and performing a DMAtransfer of the messages into message buffers according to the selecteddescriptors.

Filtering engine 435 is responsible for filtering multicast messagesupon arrival at network adapter 400 (e.g., from a communicationnetwork). As part of its operations, filtering engine 435 may usemulticast filtering store 441, which may store filtering addresses orrepresentations thereof.

Communication network interface 450 may, for example, be a physicaltransceiver for communicatively coupling the network adapter with acommunication network. The interface may, for instance, conform to anEthernet protocol. In general, communication network interface may beany combination of devices by which a network adapter can receive fromand output data to a communication network.

Network 460 is responsible for communicating data between processor 410,host computer system interface 420, memory 430, and communicationnetwork interface 450. Network 460 may, for example, include a number ofdifferent types of busses (e.g., serial and parallel).

In certain modes of operation, as multicast filtering addresses arepushed down to network adapter 400 from virtual machines (e.g., bymemory-mapped input/output (MMIO) operations), processor 410, accordingto filtering engine 435, may store filtering data (e.g., the address ora representation thereof) associated with the address in filtering store441.

Network adapter 400 may also use multicast filtering stores of virtualmachines as additional storage for multicast filtering data. Forexample, if multicast filtering store 441 is full when network adapter400 receives a multicast filtering address from a virtual machine,network adapter 400 may store the associated filtering data in themulticast filtering store for the virtual machine.

In particular implementations, network adapter 400 may select whichfiltering data to put in a multicast filtering store of a virtualmachine on other than a time-ordered basis. For example, network adapter400 may examine the number of filtering addresses each virtual machinehas, as well of the frequency of use of the filtering data in filteringstore 441. Network adapter 400 may also place multicast filtering datain filtering stores of virtual machines before filtering store 441 isfull. For example, network adapter 400 may choose to place multicastfiltering data in filtering stores of virtual machines when newfiltering data has a relatively high priority.

If the virtual machine associated with the filtering data to beoffloaded from networking adapter 400 has a region of memory set up fora multicast filtering store and there is space available in the region,processor 410 may place the filtering data in the memory area of thevirtual machine. This area may be accessible or readable/writable bynetwork adapter 400 through DMA techniques.

When network adapter 400 receives an incoming multicast message,processor 410, according to receive engine 434, may place the messageinto receive message store 440. Processor 410 may then be informed thatthe message is a multicast message by hardware, which may, for example,examine the low bit of the first byte, and, according to filteringengine 435, filter the message against the data in multicast filteringstore 441 (by exact match, hash, or both). If a match is found,processor 410 may pass the message through to a number of virtualmachines, which may be listening for the multicast message.

If, however, a match is not found in filtering store 441, processor 410may analyze multicast filtering stores in the virtual machines, if any.If a match is found in one of the filtering stores of the virtualmachines, processor 410 may pass the message to the virtual machines. Ifa match is not found in the filtering stores of the virtual machines,the message may be dropped.

It should be understood that although not shown, other hardware and/orsoftware components could be used in conjunction with network adapter400. Examples, include, but are not limited to: microcode, devicedrivers, redundant processing units, external disk drive arrays, RAIDsystems, tape drives, and data archival storage systems, etc.

The terminology used herein is for the purpose of describing particularimplementations only and is not intended to be limiting. As used herein,the singular form “a”, “an”, and “the” are intended to include theplural forms as well, unless the context clearly indicates otherwise. Itwill be further understood that the terms “comprises” and/or“comprising,” when used in the this specification, specify the presenceof stated features, integers, steps, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps, operations, elements, components,and/or groups therefore.

The corresponding structure, materials, acts, and equivalents of allmeans or steps plus function elements in the claims below are intendedto include any structure, material, or act for performing the functionin combination with other claimed elements as specifically claimed. Thedescription of the present implementations has been presented forpurposes of illustration and description, but is not intended to beexhaustive or limited to the implementations in the form disclosed. Manymodification and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of thedisclosure. The implementations were chosen and described in order toexplain the principles of the disclosure and the practical applicationand to enable others or ordinary skill in the art to understand thedisclosure for various implementations with various modifications as aresuited to the particular use contemplated.

A number of implementations have been described for multicast messagefiltering in virtual environments, and several others have beenmentioned or suggested. Moreover, those skilled in the art will readilyrecognize that a variety of additions, deletions, modifications, andsubstitutions may be made to these implementations while still achievingmulticast message filtering in virtual environments. Thus, the scope ofthe protected subject matter should be judged based on the followingclaims, which may capture one or more concepts of one or moreimplementations.

The invention claimed is:
 1. A system comprising: a computer systemhaving hardware resources; a virtualizer engine configured to virtualizethe hardware resources to provide a plurality of virtual machines; and anetwork adapter configured to: register a multicast filtering addressreceived from a number of virtual machines, the multicast filteringaddress identifying a destination address for filtering incomingmulticast messages sent from a source to a group of the virtual machinesusing the destination address; responsive to registering the multicastfiltering address, determine whether a multicast filtering store of thenetwork adapter is full; and responsive to determining that themulticast filtering store of the network adapter is full, store themulticast filtering address in a local filtering store of at least oneof the number of virtual machines.
 2. The system of claim 1, wherein thelocal filtering store includes a region of a memory on the at least onevirtual machine reachable by the network adapter.
 3. The system of claim1, wherein the at least one virtual machine is configured to allocate aregion of a memory of the at least one virtual machine as the localfiltering store.
 4. The system of claim 1, wherein the at least onevirtual machine is configured to: allocate a region of a memory of theat least one virtual machine as the local filtering store; map theregion to the network adapter; and communicate the mapping of the regionto the network adapter.
 5. The system of claim 1, wherein the networkadapter is further configured to maintain a reference count that isincremented each time a particular multicast filtering address isattempted to be added to the multicast filtering store of the networkadapter.
 6. The system of claim 1, wherein the network adapter isconfigured to, responsive to receiving a multicast message, determinewhich of the number of virtual machines to analyze for a destinationaddress matching a destination address of the multicast message.
 7. Thesystem of claim 1, wherein the network adapter is configured to,responsive to receiving a multicast message, determine which of thenumber of virtual machines have local filtering stores.
 8. A methodcomprising: registering a multicast filtering address received from anumber of virtual machines, by a network adapter, the multicastfiltering address identifying a destination address for filteringincoming multicast messages sent from a source to a group of the virtualmachines using the destination address; responsive to registering themulticast filtering address, determining whether a multicast filteringstore of the network adapter is full; and responsive to determining thatthe multicast filtering store of the network adapter is full, storingthe multicast filtering address in a local filtering store of at leastone of the number of virtual machines.
 9. The method of claim 8, whereinstoring includes storing the multicast filtering address in a region ofa memory on the at least one virtual machine reachable by the networkadapter.
 10. The method of claim 8, further comprising allocating aregion of a memory of the at least one virtual machine as the localfiltering store.
 11. The method of claim 8, further comprising:allocating a region of a memory of the at least one virtual machine asthe local filtering store; mapping the region to the network adapter;and communicating the mapping of the region to the network adapter. 12.The method of claim 8, further comprising maintaining a reference countthat is incremented each time a particular multicast filtering addressis attempted to be added to the multicast filtering store of the networkadapter.
 13. The method of claim 8, further comprising, responsive toreceiving a multicast message by the network adapter, determining whichof the number of virtual machines to analyze for a destination addressmatching a destination address of the multicast message.
 14. The methodof claim 8, further comprising, responsive to receiving a multicastmessage by the network adapter, determining which of the number ofvirtual machines have local filtering stores.
 15. A computer programproduct for multicast filtering in virtual environments, the computerprogram product comprising: a non-transitory computer readable mediumhaving computer readable program code embodied therewith, the computerreadable program code configured to: register a multicast filteringaddress received from a number of virtual machines, by a networkadapter, the multicast filtering address identifying a destinationaddress for filtering incoming multicast messages sent from a source toa group of the virtual machines using the destination address;responsive to registering the multicast filtering address, determinewhether a multicast filtering store of the network adapter is full; andresponsive to determining that the multicast filtering store of thenetwork adapter is full, store the multicast filtering address in alocal filtering store of at least one of the number of virtual machines.16. The computer program product of claim 15, wherein the computerreadable program code is configured to store the multicast filteringaddress in a region of a memory on the at least one virtual machinereachable by the network adapter.
 17. The computer program product ofclaim 15, wherein the computer readable program code is configured toallocate a region of a memory of the at least one virtual machine as thelocal filtering store.
 18. The computer program product of claim 15,wherein the computer readable program code is configured to: allocate aregion of a memory of the at least one virtual machine as the localfiltering store; map the region to the network adapter; and communicatethe mapping of the region to the network adapter.
 19. The computerprogram product of claim 15, wherein the computer readable program codeis configured to maintain a reference count that is incremented eachtime a particular multicast filtering address is attempted to be addedto the multicast filtering store of the network adapter.
 20. Thecomputer program product of claim 15, wherein the computer readableprogram code is configured to, responsive to receiving a multicastmessage by the network adapter, determine which of the number of virtualmachines have local filtering stores.